package com.example.recycler.write.UiFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by Administrator on 2017/4/27.
 */

public class MyFragmentAdapter extends FragmentPagerAdapter{
    private Fragment[] mFragments;
    public MyFragmentAdapter(FragmentManager fm,Fragment[] fragments) {
        super(fm);
        mFragments=fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments[position];
    }

    @Override
    public int getCount() {
        return mFragments.length;
    }
}
